<?php
require_once dirname(__FILE__).'/include.php';
Master::loadCoreClass("AdminControl");
$Admin = new AdminControl();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=Config::$siteName ?></title>		
<?php
require_once dirname(__FILE__).'/heard.php';
?>		
</head>
<body>
<?php
$Admin = new AdminControl();
if (Get::getByKey('action')=='save')
{	
	$Admin ->createAdmins();
	Header("Location:adminlist.php");
}
$listadminsgroup = $Admin->listAdminsGroup(array());
?>
<div id="main-content">		
				<div class="content-box">
				<div class="content-box-header">					
					<h3>当前位置：<?=("Project")?>管理系统 &gt; 管理员管理</h3>					
					<ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">添加管理员</a></li>
					</ul>					
					<div class="clear"></div>					
				</div>
				<div class="content-box-content">					
					<div class="tab-content default-tab" id="tab1"> 
						<form action="?action=save" method="post" name="admins" id = "admins">							
							<fieldset>								
								<p>	
									<label>用户名</label>
									<input class="text-input small-input" type="text" id="username" name="username" /> <span class="input-notification success png_bg">登录系统时使用的用户名</span>
									<label>密码</label>
									<input class="text-input small-input" type="text" id="password" name="password" /> <span class="input-notification success png_bg">登录系统时使用的密码</span>	
									<label>姓名</label>
									<input class="text-input small-input" type="text" id="realname" name="realname" /> <span class="input-notification success png_bg">请使用真是姓名</span>				
									<label>邮箱</label>
									<input class="text-input small-input" type="text" id="email" name="email" /> <span class="input-notification success png_bg">格式：</span>		
									<label>电话</label>
									<input class="text-input small-input" type="text" id="mobile" name="mobile" /> <span class="input-notification success png_bg">格式：</span>		
									<label>icq</label>
									<input class="text-input small-input" type="text" id="oicq" name="oicq" /> <span class="input-notification success png_bg">格式：</span>		
									<label>权限</label>
									<?=SelectForm("groupid",$listadminsgroup,"id","name","")?>
									<span class="input-notification success png_bg">格式：</span>																						
								</p>
								<div class="clear"></div>
								<input  type="submit"  value="提交"/> <input type="reset"  value="重置" />	
							</fieldset>
						</form>
					</div> 
					
				</div> 
</div> 
</div>

</body>  
</html>
